<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 项目风险管理系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css">
    <style>
        html, body {
            height: 100%;
        }
        body {
            display: flex;
            align-items: center;
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
        }
        .form-signin {
            width: 100%;
            max-width: 330px;
            padding: 15px;
            margin: auto;
        }
        .form-signin .form-control {
            position: relative;
            box-sizing: border-box;
            height: auto;
            padding: 10px;
            font-size: 16px;
        }
        .form-signin .form-control:focus {
            z-index: 2;
        }
        .form-signin input[type="text"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }
        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
    </style>
</head>
<body class="text-center">
    <form class="form-signin" th:action="@{/login}" method="post">
        <h1 class="h3 mb-3 font-weight-normal">项目风险管理系统</h1>
        <h2 class="h5 mb-3 font-weight-normal">请登录</h2>
        
        <div th:if="${param.error}" class="alert alert-danger">
            <i class="fa fa-exclamation-circle"></i> 用户名或密码错误
        </div>
        <div th:if="${param.logout}" class="alert alert-success">
            <i class="fa fa-check-circle"></i> 您已成功退出登录
        </div>
        
        <label for="username" class="sr-only">用户名</label>
        <input type="text" id="username" name="username" class="form-control" placeholder="用户名" required autofocus>
        
        <label for="password" class="sr-only">密码</label>
        <input type="password" id="password" name="password" class="form-control" placeholder="密码" required>
        
        <button class="btn btn-lg btn-primary btn-block" type="submit">
            <i class="fa fa-sign-in"></i> 登录
        </button>
        
        <p class="mt-3 mb-3 text-muted">
            <a href="/risk-management/">返回首页</a>
        </p>
        
        <div class="alert alert-info mt-4">
            <small>默认管理员账号: admin / 密码: 123456</small>
        </div>
        
        <p class="mt-5 mb-3 text-muted">© 2025 项目风险管理系统</p>
    </form>
    
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html> 